Existing video image coding technologies include an intra-frame coding technology and an inter-frame coding technology. Intra-frame coding is a technology of coding image content by using only spatial correlation in a currently coded image block. Inter-frame coding is a technology of coding a currently coded image block by using time correlation between the currently coded image block and a coded image block.
To increase intra-frame coding efficiency for an image, an intra-frame prediction technology is first introduced in the H.264 Advanced Video Coding (H.264/AVC) standard to remove spatial information redundancy between a currently coded image block (hereinafter referred to as a current block) and an adjacent coded image block. The High Efficiency Video Coding (HEVC) solution is a new-generation video coding standardization solution currently being studied by the International Organization for Standardization, which inherits and is extended from the intra-frame prediction coding technology in the H.264/AVC standard. A prediction mode set of a chrominance component of an image block may include six optional prediction modes: a direct mode (DM) mode: prediction is performed by using a prediction mode of a luminance component of a current block as a prediction mode of a chrominance component of the current block; a linear method (LM) mode: a predicted value of a chrominance component sampling point is calculated based on a correlation model by using a reconstructed value of a luminance component sampling point, where a parameter of the correlation model is obtained through calculation according to reconstructed values of luminance component and chrominance component sampling points right above and on the left of a current block; a direct current (DC) mode: an average value of reconstructed values of adjacent chrominance component sampling points right above and on the left of a current block is used as a predicted value of a chrominance component sampling point of the current block; a planar mode: a predicted value of a chrominance component sampling point of a current block is calculated based on an assumption of spatial smooth linear variation of values of chrominance component sampling points; a horizontal mode: a reconstructed value of a chrominance component sampling point on the left side of a current block is used as a predicted value of all chrominance component sampling points in a same row of the current block; and a vertical mode: a reconstructed value of an adjacent chrominance component sampling point right above a current block is used as a predicted value of all chrominance component sampling points in a same column of the current block.
Among the foregoing prediction modes, the DC mode, the vertical mode, the horizontal mode, and the planar mode have a same basic principle as corresponding prediction modes in the H.264/AVC standard, but specific implementation methods are different. The LM mode and the DM mode are two newly added prediction modes.
However, in the existing HEVC solution, a prediction mode set of a chrominance component cannot adapt to the diversity of edge positions of a current block, and in some cases, a prediction effect needs to be improved.